/*!
 * \file ast_visitor_base.h
 *
 * \brief All concrete visitors for an ast must implement this interface.
 *
 * \date Started: 7/12/2010
 * \date Last Modified: 7/27/2010
 * \authors Alan LaMielle
 * \authors Ian Craig
 * \authors Nicholas Jeanette
 *
 * Copyright (c) 2010, Colorado State University <br>
 * All rights reserved. <br>
 * See ../../COPYING for details. <br>
 */

#ifndef AST_VISITOR_BASE_H
#define AST_VISITOR_BASE_H

#include <iegenlib/iegenlib.h>

namespace iegenlib{

/*!
 * \class VisitorAdapter
 *
 * \brief Base AST visitor class
 *
 * This class serves as the base visitor class for all visitors that will
 * traverse this particular AST. There are case methods to be
 * overloaded for each node type.
 *
 * If you are looking to start another visitor class, you should look at the
 * DepthFirstVisitorAdapter class that is already in place and inherit from
 * that instead. If you would like to traverse the AST structure in a different
 * order, then you should use a different class and inherit from this one.
 *
 */
class VisitorAdapter{
public:

  /*!
   * VisitorAdapter Default Constructor
   */
  VisitorAdapter(){};

  virtual ~VisitorAdapter(){};

  /*!
   * hook method called by apply methods for node
   * @param node node that calls the case method
   */
// MMS, should not need more general case
//virtual void nodeCase(Node* node) = 0;



  /*!
   * hook method called by apply methods for the PresForm node
   * @param node ast node that calls the case method
   */
  virtual void PresFormCase(PresForm* node) = 0;


  /*!
   * hook method called by apply methods for the PresSet node
   * @param node node that calls the case method
   */
  virtual void PresSetCase(PresSet* node) = 0;

  /*!
   * hook method called by apply methods for the PresRelation node
   * @param node node that calls the case method
   */
  virtual void PresRelationCase(PresRelation* node) = 0;

  /*!
   * hook method called by apply methods for the VarTuple node
   * @param node node that calls the case method
   */
  virtual void VarTupleCase(VarTuple* node) = 0;

  /*!
   * hook method called by apply methods for the Conjunction node
   * @param node node that calls the case method
   */
  virtual void ConjunctionCase(Conjunction* node) = 0;

  /*!
   * hook method called by apply methods for the Constraint node
   * @param node node that calls the case method
   */
  virtual void ConstraintCase(Constraint* node) = 0;

  /*!
   * hook method called by apply methods for the Equality node
   * @param node node that calls the case method
   */
  virtual void EqualityCase(Equality* node) = 0;

  /*!
   * hook method called by apply methods for the Inequality node
   * @param node node that calls the case method
   */
  virtual void InequalityCase(Inequality* node) = 0;

  /*!
   * hook method called by apply methods for the Expression node
   * @param node node that calls the case method
   */
  virtual void ExpressionCase(Expression* node) = 0;

  /*!
   * hook method called by apply methods for the VarExp node
   * @param node node that calls the case method
   */
  virtual void VarExpCase(VarExp* node) = 0;

  /*!
   * hook method called by apply methods for the FuncExp node
   * @param node node that calls the case method
   */
  virtual void FuncExpCase(FuncExp* node) = 0;

  /*!
   * hook method called by apply methods for the NormExp node
   * @param node node that calls the case method
   */
  virtual void NormExpCase(NormExp* node) = 0;

protected:

  ///root node of the AST
  Node* root;
};

}//end namespace iegenlib

#endif
